package com.acme.bankapp.exceptions;

import com.acme.bankapp.domain.bank.accounts.Account;

/**
 * Created by Student on 17.11.2014.
 */
public class OverDraftLimitExceededException extends NotEnoughFundsException {

    private Account acc;

    public OverDraftLimitExceededException(double amount, Account acc) {
        super(amount);
        this.acc = acc;
    }

    public OverDraftLimitExceededException(double amount) {
        super(amount);
    }

    public Account getAcc() {
        return acc;
    }

    public double getMaxLimit() {
        return acc.maximumAmountToWithdraw();
    }
}
